package com.springboot.cloud.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.springboot.cloud.core.model.SystemResource;
import com.springboot.cloud.system.dao.SystemResourceMapper;
import com.springboot.cloud.system.service.SystemResourceService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Bertram
 * @since 2019-11-05
 */
@Service
public class SystemResourceServiceImpl extends ServiceImpl<SystemResourceMapper, SystemResource> implements SystemResourceService {

    @Override
    public List<SystemResource> selectAll() {
        return this.list();
    }

    @Override
    public List<SystemResource> selectResourceByUserName(String username) {
        List<SystemResource> systemResources = Lists.newArrayList();
        SystemResource systemResource = new SystemResource();
        systemResource.setResourceCode("test");
        systemResource.setResourceMethod("GET");
        systemResource.setResourceUrl("/system_user/get_user");
        systemResources.add(systemResource);
        return systemResources;
    }
}
